﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="QuanLySanPhamControl.ascx.cs"
    Inherits="TMDT.Web.UI.Controls.SanPhamControl" %>
<asp:MultiView runat="server" ID="mtvView">
    <asp:View runat="server" ID="vInsert">
           
        <table class="data-table">
            <thead>
                <tr>
                    <th>
                        Sửa
                    </th>
                    <th>
                        STT
                    </th>
                    <th>
                        Loại sản phẩm
                    </th>
                    <th>
                        Nhà sản xuất
                    </th>
                    <th>
                        Khuyến mãi
                    </th>
                    <th>
                        Nội dung khuyến mãi
                    </th>
                    <th>
                        Ngày đăng
                    </th>
                    <th>
                        Số lượt xem
                    </th>
                    <th>
                        Số lượng
                    </th>
                    <th>
                        Thời gian
                    </th>
                    <th>
                        Giá
                    </th>
                    <th>
                        Xóa
                    </th>
                </tr>
            </thead>
            <tbody>
                <asp:Repeater runat="server" ID="rptSanPham" 
                    onitemdatabound="rptSanPham_ItemDataBound">
                    <ItemTemplate>
                        <tr>
                            <td>
                                <asp:ImageButton runat="server" ID="ibnEdit" ImageUrl="~/Images/edit.png" CommandArgument='<%# Eval("IDSanPham")%>' OnClick="ibnEdit_Click"/>
                            </td>
                            <td>
                                <asp:Label runat="server" ID="lblSTT" Text='<%# Container.ItemIndex + 1 %>'></asp:Label>
                            </td>
                            <td>
                                <asp:Label ID="lblLoaiSanPham" runat="server" Text="Label"></asp:Label>
                            </td>
                            <td>
                                 <asp:Label ID="lblNhaSanXuat" runat="server" Text="Label"></asp:Label>
                            </td>
                            <td>
                                <asp:Literal ID="ltrKhuyenMai" runat="server"></asp:Literal>
                            </td>
                            <td>
                                <%# Eval("NoiDungKhuyenMai") %>
                            </td>
                            <td>
                                <%# Eval("NgayTao") %>
                            </td>
                            <td>
                                <%# Eval("SoLuotXem") %>
                            </td>
                            <td>
                                <%# Eval("SoLuong") %>
                            </td>
                            <td>
                                <%# Eval("ThoiGianBaoHanh") %>
                            </td>
                            <td>
                                <%# Eval("Gia") %>
                            </td>
                            <td>
                                <asp:ImageButton runat="server" ID="ibnDelete" ImageUrl="~/Images/delete.png" CommandArgument='<%# Eval("IDSanPham")%>' OnClick="ibnDelete_Click"/>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <AlternatingItemTemplate>
                        <tr>
                            <td>
                                <asp:ImageButton runat="server" ID="ibnEdit" ImageUrl="~/Images/edit.png" CommandArgument='<%# Eval("IDSanPham")%>' OnClick="ibnEdit_Click"/>
                            </td>
                            <td>
                                <asp:Label runat="server" ID="lblSTT" Text='<%# Container.ItemIndex + 1 %>'></asp:Label>
                            </td>
                             <td>
                                <asp:Label ID="lblLoaiSanPham" runat="server" Text="Label"></asp:Label>
                            </td>
                            <td>
                                 <asp:Label ID="lblNhaSanXuat" runat="server" Text="Label"></asp:Label>
                            </td>
                            <td>
                                <asp:Literal ID="ltrKhuyenMai" runat="server"></asp:Literal>
                            </td>
                            <td>
                                <%# Eval("NoiDungKhuyenMai") %>
                            </td>
                            <td>
                                <%# Eval("NgayTao") %>  
                            </td>
                            <td>
                                <%# Eval("SoLuotXem") %>
                            </td>
                            <td>
                                <%# Eval("SoLuong") %>
                            </td>
                            <td>
                                <%# Eval("ThoiGianBaoHanh") %>
                            </td>
                            <td>
                                <%# Eval("Gia") %>
                            </td>
                            <td>
                                <asp:ImageButton runat="server" ID="ibnDelete" ImageUrl="~/Images/delete.png" CommandArgument='<%# Eval("IDSanPham")%>' OnClick="ibnDelete_Click"/>
                            </td>
                        </tr>
                    </AlternatingItemTemplate>
                </asp:Repeater>
            </tbody>
        </table>
    </asp:View>
    <asp:View runat="server" ID="vUpdate">
        <table>
            <tr>
                <td>
                    Loại sản phẩm:
                </td>
                <td>
                    <asp:DropDownList runat="server" ID="ddlIDLoaiSanPhamUpdate">
                    </asp:DropDownList>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Nhà sản xuất:</td>
                <td>
                    <asp:DropDownList runat="server" ID="ddlIDNhaSanXuatUpdate">
                    </asp:DropDownList>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    <asp:CheckBox runat="server" ID="chkIsKhuyenMaiUpdate" Text="IsKhuyenMai"></asp:CheckBox>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Nội dung khuyến mãi:
                </td>
                <td>
                    <asp:TextBox runat="server" ID="txtNoiDungKhuyenMaiUpdate" Text="" CssClass="text"> </asp:TextBox>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Số lượng:</td>
                <td>
                    <asp:TextBox runat="server" ID="txtSoLuongUpdate" Text="" CssClass="text"> </asp:TextBox>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    <asp:CheckBox runat="server" ID="chkIsBaoHanhUpdate" Text="IsBaoHanh"></asp:CheckBox>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Thời gian BH:</td>
                <td>
                    <asp:TextBox runat="server" ID="txtThoiGianBaoHanhUpdate" Text="" CssClass="text"> </asp:TextBox>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Giá:</td>
                <td>
                    <asp:TextBox runat="server" ID="txtGiaUpdate" Text="" CssClass="text"> </asp:TextBox>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <asp:LinkButton runat="server" ID="lbnUpdate"><span>Cập nhật</span></asp:LinkButton>
                    &nbsp; <asp:LinkButton
                        runat="server" ID="lbnCancel"><span>Trở về</span></asp:LinkButton>
                </td>
            </tr>
        </table>
    </asp:View>
</asp:MultiView>
